//package cn.kgm.generator;
//
//import cn.kgm.cache.lock.DLock;
//import cn.kgm.cache.lock.DistributedLock;
//import org.junit.jupiter.api.Test;
//import org.springframework.boot.test.context.SpringBootTest;
//
//import javax.annotation.Resource;
//import java.util.concurrent.TimeUnit;
//
///**
// * @Version 1.8
// * @Author: Kappi
// * @Date: 2024-3-21 15:33
// * @Description: cn.kgm.generator.LockTestController
// */
//@SpringBootTest
//public class LockTestController {
//
//    private static final String LOCK_KEY = "LOCK_KEY";
//
//    @Resource
//    private DistributedLock distributedLock;
//
//    @Test
//    void lock() {
//        DLock dLock = distributedLock.getLock(LOCK_KEY);
//        boolean b = dLock.tryLock(5, TimeUnit.SECONDS);
//    }
//}
